package com.dodayum.config;

import io.camunda.zeebe.client.ZeebeClient;
import io.camunda.zeebe.client.ZeebeClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @version 1.0
 * 备注：
 * @Author BaiYu
 * @Date 2024/11/20 18:40
 */

@Configuration
public class ZeebeConfig {
    @Bean
    public ZeebeClient zeebeClient() {
        final ZeebeClientBuilder clientBuilder = ZeebeClient.newClientBuilder()
//                .brokerContactPoint("127.0.0.1:26500") // 使用application.properties中的值
                .usePlaintext(); // 如果是本地测试环境，通常使用明文通信

        return clientBuilder.build();
    }
}
